<?php

namespace Test\Unit;

use Design\Structural\Decorator\Wifi;
use Design\Structural\Decorator\ExtraBed;
use Design\Structural\Decorator\DoubleRoomBooking;

class DecoratorTest extends \Test\BaseTest
{


    public function testCanInstanceDoubleRoomBooking()
    {
        $booking = new DoubleRoomBooking();

        $this->assertSame(40, $booking->calculatePrice());
        $this->assertSame('Double room', $booking->getDescription());

    }//end testCanInstanceDoubleRoomBooking()


    public function testCanInstanceBasicBookingWithWifi()
    {
        $booking = new DoubleRoomBooking();
        $booking = new Wifi($booking);

        $this->assertSame(42, $booking->calculatePrice());
        $this->assertSame('Double room with wifi', $booking->getDescription());

    }//end testCanInstanceBasicBookingWithWifi()


    public function testCanInstanceBasicBookingWithWifiAndExtraBed()
    {
        $booking = new DoubleRoomBooking();
        $booking = new Wifi($booking);
        $booking = new ExtraBed($booking);

        $this->assertSame(72, $booking->calculatePrice());
        $this->assertSame('Double room with wifi with extra bed', $booking->getDescription());

    }//end testCanInstanceBasicBookingWithWifiAndExtraBed()


}//end class
